
class AccountsReceivableBean {
  List<AccountData>? data;
  String? msg;
  int? status;

  AccountsReceivableBean({this.data, this.msg, this.status});

  AccountsReceivableBean.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = <AccountData>[];
      json['data'].forEach((v) {
        data!.add(new AccountData.fromJson(v));
      });
    }
    msg = json['msg'];
    status = json['status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    data['msg'] = this.msg;
    data['status'] = this.status;
    return data;
  }
}

class AccountData {
  String? cMCODE;
  String? cMNAME;
  String? iCODE;
  String? iDATE;
  int? iMONEY;
  int? iRECMONEY;
  String? iTYPE;

  AccountData(
      {this.cMCODE,
        this.cMNAME,
        this.iCODE,
        this.iDATE,
        this.iMONEY,
        this.iRECMONEY,
        this.iTYPE});

  AccountData.fromJson(Map<String, dynamic> json) {
    cMCODE = json['CM_CODE'];
    cMNAME = json['CM_NAME'];
    iCODE = json['I_CODE'];
    var betinTime = DateTime.fromMillisecondsSinceEpoch(json['I_DATE']);
    iDATE = "${betinTime.year}-${betinTime.month.toString().padLeft(2, '0')}-${betinTime.day.toString().padLeft(2, '0')}";

    iMONEY = json['I_MONEY'];
    iRECMONEY = json['I_RECMONEY'];
    iTYPE = json['I_TYPE'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['CM_CODE'] = this.cMCODE;
    data['CM_NAME'] = this.cMNAME;
    data['I_CODE'] = this.iCODE;
    data['I_DATE'] = this.iDATE;
    data['I_MONEY'] = this.iMONEY;
    data['I_RECMONEY'] = this.iRECMONEY;
    data['I_TYPE'] = this.iTYPE;
    return data;
  }
}
